package June;

public class Test_19_3 {
    public static void main(String[] args) {
        Employee1 people1 = new Employee1("king", '男' , 18, "CEO", 20000.8);
        Employee1 people2 = new Employee1("king", '男' , 18);
        Employee1 people3 = new Employee1("CEO", 20000.8);

    }
}

// 创建一个Employee类，
// 属性有(名字，性别，年龄，职位，薪水)，
// 提供3个构造方法，可以初始化
// (1)(名字，性别，年龄，职位，薪水)，
// (2)(名字，性别，年龄)
// (3)(职位，薪水)，
// 要求充分复用构造器
class Employee1 {
    String name;
    char sex;
    int age;
    String site;
    double sla;
    public Employee1(String name, char sex, int age, String site, double sla) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.site = site;
        this.sla = sla;
        System.out.println(name + sex + age + site + sla);
    }
    public Employee1(String name, char sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        System.out.println(name + sex + age);
    }
    public Employee1(String site, double sla) {
        this.site = site;
        this.sla = sla;
        System.out.println(site + sla);
    }
}
